package com.itheima.day03.demo1;

public class Computer {

    public void installUSB(USB usb) {
        usb.access();

        if (usb instanceof Mouse) {
            Mouse mouse = (Mouse) usb;
            mouse.click();
        }else if (usb instanceof KeyBoard) {
            KeyBoard keyBoard= (KeyBoard) usb;
            keyBoard.typ();
        }


        usb.pullOut();
    }
}
